/**
 * 数据库配置
 */
let config = {
  host: null,
  port: null,
  user: null,
  password: null,
  database: null,
  connectionLimit: 50, // 最大链接数
  queueLimit: 50, // 允许挂起的最大链接数
}

switch (process.env.NODE_ENV){
  case 'dev':
    // 开发
    config.host = 'localhost';
    config.port = 3306;
    config.user = 'root';
    config.password = '530256714';
    config.database = 'flash';
    break;
  case 'test':
    // 测试
    /* config.host = 'localhost';
    config.port = 3306;
    config.user = 'root';
    config.password = '530256714';
    config.database = 'flash'; */
    break;
  case 'release':
    // 预发布
    /* config.host = 'localhost';
    config.port = 3306;
    config.user = 'root';
    config.password = '530256714';
    config.database = 'flash'; */
    break;
  case 'production':
    // 正式
    /* config.host = 'localhost';
    config.port = 3306;
    config.user = 'root';
    config.password = '530256714';
    config.database = 'flash'; */
    break;
}

module.exports = config;
